class Dater {
	constructor(date) {
		this.date = date ? new Date(date) : new Date()
	}
	getDate() {
		return this.date
	}
	getDay() {
		return this.date.getDay()
	}
	getMonth() {
		return this.date.getMonth()
	}
	getYear() {
		return this.date.getFullYear()
	}
}

const dater = (date) => {
	return new Dater(date)
}

export default dater
